/*=+--+=#=+--      UAS Severe Weather Simulation Softeware        --+=#=+--+=#*\
|          Copyright (C) 2013 Regents of the University of Colorado.           |
|                             All Rights Reserved.                             |
                                                                                
     This program is free software: you can redistribute it and/or modify       
     it under the terms of the GNU General Public License version 2 as          
     published by the Free Software Foundation.                                 
                                                                                
     This program is distributed in the hope that it will be useful,            
     but WITHOUT ANY WARRANTY; without even the implied warranty of             
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              
     GNU General Public License for more details.                               
                                                                                
     You should have received a copy of the GNU General Public License          
     along with this program.  If not, see <http://www.gnu.org/licenses/>.      
                                                                                
            Jack Elston                                                         
|           elstonj@colorado.edu                                               |
|                                                                              |
\*=+--+=#=+--                 --+=#=+--+=#=+--                    --+=#=+--+=#*/
#ifndef __INTERFACE_H
#define __INTERFACE_H

#include <ncurses.h>            // ncurses
#include <menu.h>               // menus for ncurses
#include <math.h>               // value for pi

#include "String.h"             // Strings
#include "Thread.h"             // POSIX Threads

class Interface : public pThread
{
	public:
		Interface(String name);
		~Interface();
		bool init(ShmStruct * shmStructPtr);
		void update();

	private:
		WINDOW * addWindow(int x, int y, int size_x, int size_y, String title);
		WINDOW *base_window, *comm_window, *apout_window, *config_window, *apin_window;

		void reverseData();
		void revBytes(uint8_t ** from, uint8_t ** to, int num);
		piccoloRx_t piccolo_rx;
		piccoloTx_t piccolo_tx;

};

#endif
